package com.mp.approvalreq.dao;

import com.mp.approvalreq.entity.Request;
import com.mp.approvalreq.entity.StaticData;
import com.mp.approvalreq.entity.Template;
import com.mp.approvalreq.entity.UsualUser;
import com.mp.user.entity.User;

import java.util.List;

/**
 * 模板dao
 *
 * @author Administrator
 */
public interface StaticDao {
	/**
	 * 取出这些人最近提交的10条审批
	 *
	 * @param staticData
	 * @return
	 * @throws Throwable
	 */
	StaticData getLatest10RequestBySelf(StaticData staticData) throws Throwable;

	/**
	 * 取出这些人最近10条审批评论
	 *
	 * @param staticData
	 * @return
	 * @throws Throwable
	 */
	StaticData getLatest10CommentRequestBySelf(StaticData staticData) throws Throwable;

	/**
	 * 取出这些人最近10条我归档审批
	 *
	 * @param staticData
	 * @return
	 * @throws Throwable
	 */
	StaticData getLatest10FiledRequestBySelf(StaticData staticData) throws Throwable;

	/**
	 * 获得审批模板的某一具体项上个月的不为空的次数和总和
	 *
	 * @param t
	 * @param list
	 * @return
	 * @throws Throwable
	 */
	List<StaticData> getCurrentObjectNotNullTimesOfCurrentTemplate(Template t, List<Template> list) throws Throwable;

    /**
	 * 获取用户审批过的最后十条审批记录
	 *
	 * @param companyId
	 * @param companyInfoId
	 * @return
	 * @throws Throwable
	 */
	List<Request> selectLast10UserApprovedRequest(Integer companyId, Integer companyInfoId) throws Throwable;
}
